package com.gopher.gopherbeasts;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public class GameScreen extends BasicScreen {

	SpriteBatch batch;
	World world;

	public GameScreen(Game game) {
		super(game);
		batch = new SpriteBatch();
		world = new World(batch);
	}

	@Override
	public void update() {

		if (Gdx.input.isKeyPressed(Keys.ESCAPE)) {
			Gdx.app.exit();
		}

		world.update();
	}

	public void render(float interpolation) {
		world.render(interpolation);
	}

}
